package org.dftproject.lineagelinkage.metric;

import java.io.Serializable;

/**
 * @author Steve
 * @invariant 
 */
public class PedigreeScore implements Serializable{

	private static final long serialVersionUID = -4518938418790018036L;

	private PedigreeTarget m_target;
	private double m_score;
	private Object m_hierarchy;
	
	/**
	 * Constructor
	 * @param target
	 * @param score
	 * @param hierarchy
	 * @pre all values are non-null, -1<= score <= 1
	 * @post the object is created
	 */
	public PedigreeScore(PedigreeTarget target, double score, Object hierarchy) {
		super();
		m_target = target;
		m_score = score;
		m_hierarchy = hierarchy;
	}
	
	/**
	 * Constructor
	 * @post the object is created
	 */
	public PedigreeScore() {
		m_target = PedigreeTarget.UNKNOWN;
		m_score = 0;
		m_hierarchy = null;
	}

	/**
	 * Getter for the hierarchy
	 * @return the hierarchy
	 * @pre none
	 * @post result is not null
	 */
	public Object getHierarchy() {
		return m_hierarchy;
	}

	/**
	 * Setter for the hierarchy
	 * @param hierarchy the hierarchy to set
	 * @pre hierarchy != null
	 * @post the hierarchy is set on this instance
	 */
	public void setHierarchy(Object hierarchy) {
		m_hierarchy = hierarchy;
	}

	/**
	 * Getter for the score
	 * @return the score
	 * @pre none
	 * @post result is not null
	 */
	public double getScore() {
		return m_score;
	}

	/**
	 * Setter for the score
	 * @param score the score to set
	 * @pre score != null
	 * @post the score is set on this instance
	 */
	public void setScore(double score) {
		m_score = score;
	}

	/**
	 * Getter for the target
	 * @return the target
	 * @pre none
	 * @post result is not null
	 */
	public PedigreeTarget getTarget() {
		return m_target;
	}

	/**
	 * Setter for the target
	 * @param target the target to set
	 * @pre target != null
	 * @post the target is set on this instance
	 */
	public void setTarget(PedigreeTarget target) {
		m_target = target;
	}
	
	/**
	 * Ranks the comparison in terms of 0 to 5 stars
	 * @return
	 */
	public int getStars(){
	
		return 0;
	}
}
